<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <button>123</button>

  <script>
    var btn = document.querySelector('button')

    // btn.onclick = function() {
    //   console.log(123)
    // }
    // btn.onclick = function() {  // 后边的会覆盖前边的
    //   console.log(567)
    // }
    // onblur  onfocus  onmouseover


    //  click  blur focus  mouseover
    btn.addEventListener('click', function() {  // 1. 两个不会覆盖
      console.log('12313123') 
    })
    btn.addEventListener('click', function() {
      console.log('567567567')
    })
  </script>
</body>
</html>